<?php
/**
 *
 *
 * @author
 * @version
 */
class Seo_AdminController extends Zen_Controller_Admin {


public function indexAction() {
		$form = new Seo_Form_Config ();
		$module = 'seo';
		$namespace = 'settings';


		$defaults = Zen_Settings::get($module, $namespace );
		if ($defaults) {
			$form->setDefaults ( $defaults );
		}
		if ($this->_request->isPost ()) {
			if ($form->isValid ( $this->_getAllParams () )) {
				Zen_Settings::set( $module, $namespace, $form->getValues () );
				$this->_helper->FlashMessenger->setNamespace ( 'messages' )->addMessage ( array ('text' => 'Изменения сохранены', 'type' => 'alert' ) );
				$this->_redirect ( $_SERVER ['REQUEST_URI'] );
			}
		}
		$this->view->form = $form;
	}




}
